package com.bicon.botu.account.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.bicon.botu.account.common.AccountConstants;
import com.bicon.botu.account.entity.AccountInfo;
import com.bicon.botu.account.entity.AccountThird;
import com.bicon.botu.account.mapper.AccountThirdMapper;
import com.bicon.botu.account.service.AccountThirdService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author jiangbin
 * @date 2018/7/18 13:53
 */
@Slf4j
@Service
public class AccountThirdServiceImpl extends ServiceImpl<AccountThirdMapper, AccountThird> implements AccountThirdService {

    @Override
    public AccountThird getAccountThird(String thirdId, int thirdParty) {
        AccountThird accountThird = new AccountThird().selectOne(new EntityWrapper<AccountThird>().eq("third_id", thirdId).eq("third_party", thirdParty).eq("type", 1).eq("logic_delete", AccountConstants.DEL_LOGIC_NORMAL));
        return accountThird;
    }
}
